#ifndef __WIZ_BNF_ACTOR_OPERATORS_UNARY_HPP__SHANHAOBO_19800429__
#define __WIZ_BNF_ACTOR_OPERATORS_UNARY_HPP__SHANHAOBO_19800429__

#include "../../Base/WizBase.hpp"

namespace Wiz
{
    namespace BNF
    {
        namespace Actor
        {
            namespace Operators
            {
                ///////////////////////////////////////////////////////////////////////////////////////
                namespace Unary
                {
                    template <typename OperationT, typename T>
                    struct Type;
                } /// end of namespace Unary

                ///////////////////////////////////////////////////////////////////////////////////////
                namespace Unary
                {
                    struct Negative
                    {
                        template <typename T0>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Actor::Operators::Unary::Type<Negative, T0>::tResult tType;
                        };

                        template <typename T0>
                        typename ::Wiz::BNF::Actor::Operators::Unary::Type<Negative, T0>::tResult
                            operator()(T0& Arg0) const
                        {
                            return ::Wiz::BNF::Actor::Operators::Unary::Type<Negative, T0>::Evaluate(Arg0);
                        }
                    };

                    struct Positive
                    {
                        template <typename T0>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Actor::Operators::Unary::Type<Positive, T0>::tResult tType;
                        };

                        template <typename T0>
                        typename ::Wiz::BNF::Actor::Operators::Unary::Type<Positive, T0>::tResult
                            operator()(T0& Arg0) const
                        {
                            return ::Wiz::BNF::Actor::Operators::Unary::Type<Positive, T0>::Evaluate(Arg0);
                        }
                    };

                    struct LogicalNot
                    {
                        template <typename T0>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Actor::Operators::Unary::Type<LogicalNot, T0>::tResult tType;
                        };

                        template <typename T0>
                        typename ::Wiz::BNF::Actor::Operators::Unary::Type<LogicalNot, T0>::tResult
                            operator()(T0& Arg0) const
                        {
                            return ::Wiz::BNF::Actor::Operators::Unary::Type<LogicalNot, T0>::Evaluate(Arg0);
                        }
                    };

                    struct Invert
                    {
                        template <typename T0>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Actor::Operators::Unary::Type<Invert, T0>::tResult tType;
                        };

                        template <typename T0>
                        typename ::Wiz::BNF::Actor::Operators::Unary::Type<Invert, T0>::tResult
                            operator()(T0& Arg0) const
                        {
                            return ::Wiz::BNF::Actor::Operators::Unary::Type<Invert, T0>::Evaluate(Arg0);
                        }
                    };

                    struct Reference
                    {
                        template <typename T0>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Actor::Operators::Unary::Type<Reference, T0>::tResult tType;
                        };

                        template <typename T0>
                        typename ::Wiz::BNF::Actor::Operators::Unary::Type<Reference, T0>::tResult
                            operator()(T0& Arg0) const
                        {
                            return ::Wiz::BNF::Actor::Operators::Unary::Type<Reference, T0>::Evaluate(Arg0);
                        }
                    };

                    struct DeReference
                    {
                        template <typename T0>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Actor::Operators::Unary::Type<DeReference, T0>::tResult tType;
                        };

                        template <typename T0>
                        typename ::Wiz::BNF::Actor::Operators::Unary::Type<DeReference, T0>::tResult
                            operator()(T0& Arg0) const
                        {
                            return ::Wiz::BNF::Actor::Operators::Unary::Type<DeReference, T0>::Evaluate(Arg0);
                        }
                    };

                    struct PreIncr
                    {
                        template <typename T0>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Actor::Operators::Unary::Type<PreIncr, T0>::tResult tType;
                        };

                        template <typename T0>
                        typename ::Wiz::BNF::Actor::Operators::Unary::Type<PreIncr, T0>::tResult
                            operator()(T0& Arg0) const
                        {
                            return ::Wiz::BNF::Actor::Operators::Unary::Type<PreIncr, T0>::Evaluate(Arg0);
                        }
                    };

                    struct PreDecr
                    {
                        template <typename T0>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Actor::Operators::Unary::Type<PreDecr, T0>::tResult tType;
                        };

                        template <typename T0>
                        typename ::Wiz::BNF::Actor::Operators::Unary::Type<PreDecr, T0>::tResult
                            operator()(T0& Arg0) const
                        {
                            return ::Wiz::BNF::Actor::Operators::Unary::Type<PreDecr, T0>::Evaluate(Arg0);
                        }
                    };

                    struct PostIncr
                    {
                        template <typename T0>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Actor::Operators::Unary::Type<PostIncr, T0>::tResult tType;
                        };

                        template <typename T0>
                        typename ::Wiz::BNF::Actor::Operators::Unary::Type<PostIncr, T0>::tResult
                            operator()(T0& Arg0) const
                        {
                            return ::Wiz::BNF::Actor::Operators::Unary::Type<PostIncr, T0>::Evaluate(Arg0);
                        }
                    };

                    struct PostDecr
                    {
                        template <typename T0>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Actor::Operators::Unary::Type<PostDecr, T0>::tResult tType;
                        };

                        template <typename T0>
                        typename ::Wiz::BNF::Actor::Operators::Unary::Type<PostDecr, T0>::tResult
                            operator()(T0& Arg0) const
                        {
                            return ::Wiz::BNF::Actor::Operators::Unary::Type<PostDecr, T0>::Evaluate(Arg0);
                        }
                    };
                } /// end of namespace Unary

                namespace Unary
                {
                    template <typename T>
                    struct Type<::Wiz::BNF::Actor::Operators::Unary::Negative, T>
                    {
                        typedef T const tResult;

                        static tResult Evaluate(T const& Val)
                        {
                            return -Val;
                        }
                    };

                    template <typename T>
                    struct Type<::Wiz::BNF::Actor::Operators::Unary::Positive, T>
                    {
                        typedef T const tResult;

                        static tResult Evaluate(T const& Val)
                        {
                            return +Val;
                        }
                    };


                    template <typename T>
                    struct Type<::Wiz::BNF::Actor::Operators::Unary::LogicalNot, T>
                    {
                        typedef T const tResult;

                        static tResult Evaluate(T const& Val)
                        {
                            return !Val;
                        }
                    };


                    template <typename T>
                    struct Type<::Wiz::BNF::Actor::Operators::Unary::Invert, T>
                    {
                        typedef T const tResult;

                        static tResult Evaluate(T const& Val)
                        {
                            return ~Val;
                        }
                    };

                    template <typename T>
                    struct Type<::Wiz::BNF::Actor::Operators::Unary::Reference, T>
                    {
                        typedef T const tResult;

                        static tResult Evaluate(T const& Val)
                        {
                            return &Val;
                        }
                    };

                    template <typename T>
                    struct Type<::Wiz::BNF::Actor::Operators::Unary::DeReference, T>
                    {
                        typedef T const tResult;

                        static tResult Evaluate(T const& Val)
                        {
                            return *Val;
                        }
                    };

                    template <typename T>
                    struct Type<::Wiz::BNF::Actor::Operators::Unary::PreIncr, T>
                    {
                        typedef T const tResult;

                        static tResult Evaluate(T const& Val)
                        {
                            return ++Val;
                        }
                    };

                    template <typename T>
                    struct Type<::Wiz::BNF::Actor::Operators::Unary::PreDecr, T>
                    {
                        typedef T const tResult;

                        static tResult Evaluate(T const& Val)
                        {
                            return --Val;
                        }
                    };

                    template <typename T>
                    struct Type<::Wiz::BNF::Actor::Operators::Unary::PostIncr, T>
                    {
                        typedef T const tResult;

                        static tResult Evaluate(T const& Val)
                        {
                            return Val++;
                        }
                    };

                    template <typename T>
                    struct Type<::Wiz::BNF::Actor::Operators::Unary::PostDecr, T>
                    {
                        typedef T const tResult;

                        static tResult Evaluate(T const& Val)
                        {
                            return Val--;
                        }
                    };
                } /// end of namespace Unary
            } /// end of namespace Operators
        } /// end of namespace Actor
    } /// end of namespace BNF
} /// end of namespace Wiz

#endif /*__WIZ_BNF_ACTOR_OPERATORS_UNARY_HPP__SHANHAOBO_19800429__*/
